//
//  TMItemDetailCell.m
//  国学培训用户端
//
//  Created by Tao Li on 2018/7/16.
//  Copyright © 2018年 mac. All rights reserved.
//

#import "TMItemDetailCell.h"
#import "TMCourseDetailModel.h"
@implementation TMItemDetailCell
-(void)awakeFromNib{
    [super awakeFromNib];
    self.contentView.backgroundColor = [UIColor whiteColor];
    self.headerImage.contentMode = UIViewContentModeScaleAspectFill;
    self.headerImage.clipsToBounds = YES;
}
- (void)setModel:(TMCourseDetailModel *)model{
    _model = model;
    self.coursePrice.text = [NSString stringWithFormat:@"价格:¥%.02f元", model.price];
    self.titlelabel.text = model.name;
    [self.headerImage sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithBaseUrl:model.pic[0]]] placeholderImage:kPlaceholder];
}
@end
